package org.example.myleet.p992;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(7 == solution.subarraysWithKDistinct(new int[]{1,2,1,2,3}, 2));
        Assert.isTrue(3 == solution.subarraysWithKDistinct(new int[]{1,2,1,3,4}, 3));
        Assert.isTrue(4 == solution.subarraysWithKDistinct(new int[]{1,2,1,1,3,4}, 3));
        Assert.isTrue(1 == solution.subarraysWithKDistinct(new int[]{1}, 1));
        Assert.isTrue(2 == solution.subarraysWithKDistinct(new int[]{1,2}, 1));
        Assert.isTrue(10 == solution.subarraysWithKDistinct(new int[]{2,1,2,1,2}, 2));
        Assert.isTrue(0 == solution.subarraysWithKDistinct(new int[]{2,1,2,1,1}, 3));
    }
}
